package cn.quevo.ucenter.server.configuration;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

import com.alibaba.druid.spring.boot.autoconfigure.QuevoDataSource;

@Configuration
public class DataBaseConfiguration {
	
	@Bean(name = "dataSource")
    @ConfigurationProperties(prefix = "spring.datasource.druid")
    @Primary
    public QuevoDataSource testDataSource() {
        return DataSourceBuilder.create().type(QuevoDataSource.class).build();
    }
}
